FROM openjdk:8-jdk-stretch
LABEL maintainer="caiweili <hellomrpc@126.com>"

ARG ZOOKEEPER_VERSION=3.4.13
ADD zookeeper.tar.gz /
RUN mv /zookeeper-${ZOOKEEPER_VERSION} /zookeeper

ENV PATH /zookeeper/bin/:$PATH

ADD entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

CMD ["zookeeper"]